package clids.ex2.actions;

import java.io.File;
import clids.ex2.filescript.ToolBox;

public class ActionPrintData extends AbstractAction{

	public void doAction (String filePath){
		File f = new File (filePath);
		System.out.print(f.isHidden()? "h" : "-" );
		System.out.print(f.canWrite()? "w" : "-" );
		System.out.print(f.canExecute()? "x" : "-" );
		System.out.print(" ");
		System.out.print(ToolBox.convertFileSizeKB(f.length()) + " ");
		System.out.print(ToolBox.convertDate(f.lastModified()) + " ");
		System.out.print(f.getAbsolutePath());
		System.out.println();
		
	}
}
